<?php

function V_About($arrayData, $mode) {
    include("../fckeditor/fckeditor.php");
    $ulr = "?" . MODUL . "=home&" . ACTION . "=" . $mode;
    $StrLbl = "";
    if ($mode == "about") {
        $StrLbl1 = "Chỉnh sửa thông tin giới thiệu";
        $StrLbl2 = "Thông tin giới thiệu";
    } else if ($mode == "banner") {
        $StrLbl1 = "Chỉnh sửa thông tin Banner";
        $StrLbl2 = "Thông tin Banner";
    }
    ?>
    <h3><?= $StrLbl1 ?></h3>
    <form enctype="multipart/form-data" action="<?= $ulr ?>" method="post" name="frm" onSubmit="return validateForm();">
        <input type="hidden" name="id" id="id" value="<?= $arrayData['id']; ?>"/>
        <table width="950px" cellpadding="5" border="1">
            <tr style="background-color: #99CCFF">
                <th colspan="2"><?= $StrLbl2 ?></th>
            </tr>
            <tr>
                <td width="200px"><strong>Nội dung</strong></td>
                <td>
                    <?php
                    // Lay ve duong dan chinh cua server.
                    $sBasePath = $_SERVER['PHP_SELF'];

                    // Lay ve thu muc goc cho den _sample.
                    $sBasePath = substr($sBasePath, 0, strpos($sBasePath, "run"));
                    //echo "sBasePath = $sBasePath";
                    $sBasePath = $sBasePath . "fckeditor/";
                    $oFCKeditor = new FCKeditor('info_content');
                    $oFCKeditor->BasePath = $sBasePath;
                    $oFCKeditor->Width = '100%';
                    $oFCKeditor->Height = '400';
                    $oFCKeditor->Value = $arrayData["info_content"];
                    $oFCKeditor->Create();
                    ?>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div style="float: right">
                        <input type="reset" name="reset"  value="Nhập lại"/>
                        <input type="submit" name="Submit" value="Cập Nhật"/>
                    </div>
                </td>
            </tr>
        </table>
    </form>
    <?
}
?>
